<?php
declare (strict_types=1);

namespace app\exam\event\listeners;

use think\facade\Cache;

/**
 *
 * 清理redis中的试题缓存
 *
 * @package app\exam\event\listeners
 */
class ClearQuestionTopic
{
    public static function handle(int $topicId)
    {
        $redis = Cache::store('redis')->handler();
        $redis->hDel('topics_hash', (string)$topicId);
    }
}